<template>
  <div class="venue-intro">
    <div
      class="page-header image"
      :style="bannerImage ? { backgroundImage: `url(${bannerImage})` } : {}"
    >
      <div class="header-overlay">
        <div class="container">
          <h1 class="page-title">{{ "展馆介绍" }}</h1>
          <p class="page-subtitle">
            {{
              pageData.subtitle ||
              "了解FAIR plus机器人全产业链接会的展馆设施和服务"
            }}
          </p>
        </div>
      </div>
    </div>
    <!-- 导航菜单 -->
    <div class="nav-menu">
      <div class="container">
        <nav class="about-nav">
          <a
            @click="setActiveTab('exhibition-intro')"
            :class="['nav-item', { active: activeTab === 'exhibition-intro' }]"
          >
            展会介绍
          </a>
          <a
            @click="setActiveTab('product-scope')"
            :class="['nav-item', { active: activeTab === 'product-scope' }]"
          >
            展品范围
          </a>
          <a
            @click="setActiveTab('exhibition-highlights')"
            :class="[
              'nav-item',
              { active: activeTab === 'exhibition-highlights' },
            ]"
          >
            展会集锦
          </a>
          <a
            @click="setActiveTab('venue-intro')"
            :class="['nav-item', { active: activeTab === 'venue-intro' }]"
          >
            展馆介绍
          </a>
          <a
            @click="setActiveTab('organizer-intro')"
            :class="['nav-item', { active: activeTab === 'organizer-intro' }]"
          >
            主办方介绍
          </a>
          <a
            @click="setActiveTab('organization-structure')"
            :class="[
              'nav-item',
              { active: activeTab === 'organization-structure' },
            ]"
          >
            组织架构
          </a>
          <a
            @click="setActiveTab('past-exhibitions')"
            :class="['nav-item', { active: activeTab === 'past-exhibitions' }]"
          >
            往届展会
          </a>
          <a
            @click="setActiveTab('downloads')"
            :class="['nav-item', { active: activeTab === 'downloads' }]"
          >
            下载中心
          </a>
        </nav>
      </div>
    </div>

    <div class="container">
      <section class="intro-section">
        <div class="intro-content">
          <!-- 图片部分 - 如果有图片则显示 -->
          <div v-if="hasImage && !venueSections.length" class="intro-image-top">
            <img :src="pageData.imageUrl" :alt="pageData.title || '展馆介绍'" />
          </div>

          <!-- 内容部分 - 统一显示后端数据 -->
          <div class="content-wrapper" v-if="!venueSections.length">
            <!-- 如果有解析后的内容，显示解析后的内容 -->
            <div v-if="parsedContent.length > 0" class="parsed-content">
              <div
                v-for="(section, index) in parsedContent"
                :key="index"
                class="content-section"
              >
                <h4 v-if="section.title" class="section-heading">
                  <el-icon><InfoFilled /></el-icon>
                  {{ section.title }}
                </h4>
                <div v-html="section.content" class="section-content"></div>
              </div>
            </div>

            <!-- 如果没有解析后的内容，直接显示原始内容 -->
            <div v-else class="raw-content">
              <div v-html="pageData.content || defaultContent"></div>
            </div>
          </div>

          <!-- 多数据：自上而下卡片（图片在上，内容在下） -->
          <div v-else class="venue-list">
            <div class="venue-card" v-for="sec in venueSections" :key="sec.id">
              <div class="venue-image" v-if="sec.image">
                <img :src="sec.image" :alt="sec.title || '展馆介绍'" />
              </div>
              <div class="venue-body">
                <h3 class="venue-title" v-if="sec.title">{{ sec.title }}</h3>
                <div
                  class="venue-rich"
                  v-if="sec.content"
                  v-html="sec.content"
                ></div>
              </div>
            </div>
          </div>
        </div>
      </section>
    </div>
  </div>
</template>

<script>
import { ref, onMounted, computed } from "vue";
import { selectLangField } from "@/utils/lang";
import { subpageApi } from "@/api/user";
import {
  InfoFilled,
  Location,
  Grid,
  Tools,
  Star,
} from "@element-plus/icons-vue";

export default {
  name: "VenueIntro",
  components: {
    InfoFilled,
    Location,
    Grid,
    Tools,
    Star,
  },
  setup() {
    const activeTab = ref("venue-intro");
    const pageData = ref({});
    const venueSections = ref([]);
    const bannerImage = ref("");
    const defaultContent = `
      <p>深圳市会展中心（福田）是华南地区规模最大、设施最完善的现代化展馆之一，位于深圳市福田区中心地带，交通便利，配套设施齐全。</p>
      <p>展馆总面积超过150,000平方米，拥有多个专业展厅，配备先进的展示设备和技术支持，为各类展会提供优质的服务保障。</p>
    `;
    const defaultImage =
      "https://images.pexels.com/photos/3861972/pexels-photo-3861972.jpeg?auto=compress&cs=tinysrgb&w=800&h=400&fit=crop&crop=center";

    // 计算是否有图片
    const hasImage = computed(() => {
      return pageData.value.imageUrl && pageData.value.imageUrl.trim() !== "";
    });

    // 解析HTML内容，提取标题和段落
    const parsedContent = computed(() => {
      if (!pageData.value.content) return [];

      try {
        // 首先尝试直接解析纯文本内容
        const content = pageData.value.content;

        // 匹配中文数字标题格式：一、二、三、四等
        const chineseNumberPattern =
          /([一二三四五六七八九十]+、[^。！？\n\r]+)/g;
        const matches = content.match(chineseNumberPattern);

        if (matches && matches.length > 0) {
          const sections = [];
          let lastIndex = 0;

          matches.forEach((match, index) => {
            const matchIndex = content.indexOf(match, lastIndex);
            if (matchIndex >= 0) {
              // 提取标题
              const title = match.trim();

              // 提取内容（从上一个标题结束到当前标题开始）
              let contentText = "";
              if (index === 0) {
                // 第一个标题前的内容
                contentText = content.substring(0, matchIndex).trim();
              } else {
                // 两个标题之间的内容
                contentText = content.substring(lastIndex, matchIndex).trim();
              }

              // 如果有内容，添加到sections，并处理换行符
              if (contentText) {
                // 将换行符转换为HTML的br标签
                const processedContent = contentText
                  .replace(/\n/g, "<br>")
                  .replace(/\r\n/g, "<br>")
                  .replace(/\r/g, "<br>");

                sections.push({
                  title: index === 0 ? "展馆概述" : `第${index}部分`,
                  content: `<p>${processedContent}</p>`,
                });
              }

              // 更新lastIndex为当前标题的结束位置
              lastIndex = matchIndex + match.length;
            }
          });

          // 处理最后一个标题后的内容
          const lastContent = content.substring(lastIndex).trim();
          if (lastContent) {
            // 找到最后一个标题
            const lastTitle = matches[matches.length - 1];
            const titleMatch = lastTitle.match(
              /^([一二三四五六七八九十]+、)(.+)/
            );
            if (titleMatch) {
              // 处理换行符
              const processedLastContent = lastContent
                .replace(/\n/g, "<br>")
                .replace(/\r\n/g, "<br>")
                .replace(/\r/g, "<br>");

              sections.push({
                title: titleMatch[1] + titleMatch[2],
                content: `<p>${processedLastContent}</p>`,
              });
            }
          }

          // 如果找到了sections，返回
          if (sections.length > 0) {
            console.log("找到中文数字标题sections:", sections);
            return sections;
          }
        }

        // 如果没有找到中文数字标题，尝试其他格式
        const otherPatterns = [
          /([一二三四五六七八九十]+[、.．\s][^。！？\n\r]+)/g,
          /(第[一二三四五六七八九十\d]+[章节部分][^。！？\n\r]+)/g,
          /([（\(][一二三四五六七八九十\d]+[）\)][^。！？\n\r]+)/g,
        ];

        for (const pattern of otherPatterns) {
          const matches = content.match(pattern);
          if (matches && matches.length > 0) {
            const sections = [];
            let lastIndex = 0;

            matches.forEach((match, index) => {
              const matchIndex = content.indexOf(match, lastIndex);
              if (matchIndex >= 0) {
                const title = match.trim();
                let contentText = "";

                if (index === 0) {
                  contentText = content.substring(0, matchIndex).trim();
                } else {
                  contentText = content.substring(lastIndex, matchIndex).trim();
                }

                if (contentText) {
                  sections.push({
                    title: index === 0 ? "展馆概述" : `第${index}部分`,
                    content: `<p>${contentText}</p>`,
                  });
                }

                lastIndex = matchIndex + match.length;
              }
            });

            // 处理最后一个标题后的内容
            const lastContent = content.substring(lastIndex).trim();
            if (lastContent) {
              const lastTitle = matches[matches.length - 1];
              sections.push({
                title: lastTitle.trim(),
                content: `<p>${lastContent}</p>`,
              });
            }

            if (sections.length > 0) {
              return sections;
            }
          }
        }

        return [];
      } catch (e) {
        console.error("解析内容失败:", e);
        return [];
      }
    });

    // 获取位置内容
    const getLocationContent = () => {
      return "深圳市会展中心（福田）位于深圳市福田区中心地带，紧邻地铁站，交通便利，周边配套设施完善，是举办各类展会的理想场所。";
    };

    // 获取规模内容
    const getScaleContent = () => {
      return "展馆总面积超过150,000平方米，拥有多个专业展厅，可同时容纳多个展会，满足不同规模的展示需求。";
    };

    // 获取设施内容
    const getFacilitiesContent = () => {
      return "配备先进的展示设备、音响系统、照明设备，提供专业的展会服务，包括展位搭建、物流运输、餐饮服务等。";
    };

    // 获取特色内容
    const getFeaturesContent = () => {
      return "展馆设计现代化，空间布局合理，采光良好，为参展商和观众提供舒适的展示和参观环境。";
    };

    const loadPageData = async () => {
      try {
        const response = await subpageApi.getSubpageByKey(
          "about",
          "venue-intro"
        );
        console.log("展馆介绍API响应:", response);

        if (response && response.code === "200" && response.data) {
          const data = response.data;
          let content = "";
          let imageUrl = "";

          // 处理content字段，可能是JSON格式或纯文本
          if (data.content) {
            try {
              // 尝试解析为JSON
              const parsed = JSON.parse(data.content);
              if (parsed.content) {
                content = parsed.content;
                imageUrl = parsed.backgroundImage || data.imageUrl || "";
              } else {
                content = data.content;
                imageUrl = data.imageUrl || "";
              }
            } catch (e) {
              // 如果不是JSON，直接使用原始内容
              content = data.content;
              imageUrl = data.imageUrl || "";
            }
          }

          pageData.value = {
            title: data.title || "展馆介绍",
            content: content,
            imageUrl: imageUrl,
            subtitle: "了解FAIR plus机器人全产业链接会的展馆设施和服务",
          };
          console.log("展馆介绍数据加载成功:", pageData.value);
        } else {
          console.log("展馆介绍数据为空，使用默认数据");
          setDefaultData();
        }

        // 读取多条数据列表，若存在则覆盖为分节列表展示
        const listRes = await subpageApi.getSubpageList("about", "venue-intro");
        if (
          listRes &&
          listRes.code === "200" &&
          Array.isArray(listRes.data) &&
          listRes.data.length
        ) {
          venueSections.value = listRes.data.map((it, idx) => {
            let parsed = {};
            try {
              parsed = it.content
                ? typeof it.content === "string"
                  ? JSON.parse(it.content)
                  : it.content
                : {};
            } catch {}
            return {
              id: it.id || idx + 1,
              title: selectLangField(
                parsed,
                "subtitle",
                selectLangField(it, "title", parsed.subtitle || it.title || "")
              ),
              content: selectLangField(parsed, "content", it.content || ""),
              image: selectLangField(
                parsed,
                "backgroundImage",
                it.imageUrl || ""
              ),
            };
          });
        }
      } catch (error) {
        console.error("加载展馆介绍数据失败:", error);
        setDefaultData();
      }
    };

    const loadBanner = async () => {
      try {
        const resp = await subpageApi.getContentByType("carousel_about");
        if (
          resp &&
          resp.code === "200" &&
          Array.isArray(resp.data) &&
          resp.data.length
        ) {
          const first =
            resp.data.find((it) => it.status === "active") || resp.data[0];
          const content =
            typeof first.content === "string"
              ? JSON.parse(first.content || "{}")
              : first.content || {};
          bannerImage.value = first.imageUrl || content.image || "";
        }
      } catch (e) {
        bannerImage.value = "";
      }
    };

    // 设置默认数据
    const setDefaultData = () => {
      pageData.value = {
        title: "展馆介绍",
        content: `深圳市会展中心（福田）是华南地区规模最大、设施最完善的现代化展馆之一，位于深圳市福田区中心地带，交通便利，配套设施齐全。

一、展馆位置
深圳市会展中心（福田）位于深圳市福田区中心地带，紧邻地铁站，交通便利，周边配套设施完善，是举办各类展会的理想场所。

二、展馆规模
展馆总面积超过150,000平方米，拥有多个专业展厅，可同时容纳多个展会，满足不同规模的展示需求。

三、设施服务
配备先进的展示设备、音响系统、照明设备，提供专业的展会服务，包括展位搭建、物流运输、餐饮服务等。

四、展馆特色
展馆设计现代化，空间布局合理，采光良好，为参展商和观众提供舒适的展示和参观环境。`,
        imageUrl:
          "https://images.pexels.com/photos/3861972/pexels-photo-3861972.jpeg?auto=compress&cs=tinysrgb&w=800&h=400&fit=crop&crop=center",
        subtitle: "了解FAIR plus机器人全产业链接会的展馆设施和服务",
      };
    };

    const setActiveTab = (tabKey) => {
      if (!tabKey) return;
      activeTab.value = tabKey;
      // 跳转到对应的子页面
      if (tabKey !== "venue-intro") {
        window.location.href = `/${tabKey}`;
      }
    };

    onMounted(() => {
      loadPageData();
      loadBanner();
    });

    return {
      activeTab,
      pageData,
      venueSections,
      bannerImage,
      defaultContent,
      defaultImage,
      hasImage,
      parsedContent,
      getLocationContent,
      getScaleContent,
      getFacilitiesContent,
      getFeaturesContent,
      setActiveTab,
    };
  },
};
</script>

<style scoped>
.venue-intro {
  min-height: 100vh;
  background: #f8f9fa;
  /* padding-top: 70px; */
}

.page-header {
  background: linear-gradient(135deg, #320063 0%, #4a0a8a 100%);
  color: white;
  padding: 80px 0;
  text-align: center;
}

.page-header.image {
  position: relative;
  background: none;
  padding: 0;
  height: 400px;
  background-size: cover;
  background-position: center;
}
.header-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
}

.page-title {
  font-size: 48px;
  margin-bottom: 20px;
}

.page-subtitle {
  font-size: 18px;
  opacity: 0.9;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.intro-section {
  background: white;
  border-radius: 20px;
  padding: 3rem;
  margin: 2rem 0;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.section-title {
  font-size: 2rem;
  color: #333;
  margin-bottom: 2rem;
  text-align: center;
}

.intro-content {
  display: flex;
  flex-direction: column; /* 改为垂直布局 */
  gap: 2rem;
  align-items: center;
  max-width: 1000px;
  margin: 0 auto;
}

.intro-content.no-image {
  flex-direction: column;
}

.intro-text {
  width: 100%; /* 文本内容占满宽度 */
  padding-right: 0; /* 移除右边距 */
}

.intro-text.full-width {
  padding-right: 0;
}

.intro-image-top {
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  margin-bottom: 2rem; /* 添加图片下方间距 */
  width: 100%; /* 图片占满容器宽度 */
  max-width: 1000px; /* 与文本内容宽度一致 */
  text-align: center; /* 图片居中 */
}

.intro-image-top img {
  width: 100%;
  height: auto;
  display: block;
  max-height: 400px; /* 限制图片最大高度 */
  object-fit: cover; /* 保持图片比例 */
}

.text-only-layout .main-title {
  text-align: center;
  margin-bottom: 3rem;
}

.text-only-layout .main-title h3 {
  font-size: 2.2rem;
  color: #320063;
  margin-bottom: 1rem;
  font-weight: 700;
}

.text-only-layout .title-underline {
  width: 80px;
  height: 4px;
  background: linear-gradient(135deg, #320063 0%, #4a0a8a 100%);
  margin: 0 auto;
  border-radius: 2px;
}

.text-only-layout .content-sections {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  max-width: 1000px;
  margin: 0 auto;
}

.text-only-layout .parsed-content {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.text-only-layout .default-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 2rem;
}

.text-only-layout .content-section {
  background: white;
  border-radius: 15px;
  padding: 2rem;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  border: 1px solid #f0f0f0;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.text-only-layout .content-section:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.text-only-layout .section-heading {
  display: flex;
  align-items: center;
  font-size: 1.3rem;
  color: #320063;
  font-weight: 600;
  margin-bottom: 1rem;
  padding-bottom: 0.8rem;
  border-bottom: 2px solid #f0f0f0;
  background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
  padding: 1rem;
  border-radius: 8px 8px 0 0;
  margin: -2rem -2rem 1rem -2rem;
}

.text-only-layout .section-heading .el-icon {
  margin-right: 12px;
  font-size: 1.4rem;
  color: #667eea;
  background: #f8f9fa;
  padding: 8px;
  border-radius: 8px;
}

.text-only-layout .section-content {
  color: #555;
  line-height: 1.8;
  font-size: 1rem;
  white-space: pre-line; /* 确保换行符能够正确显示 */
  word-wrap: break-word; /* 长单词换行 */
  overflow-wrap: break-word; /* 现代浏览器支持 */
}

.text-only-layout .section-content p {
  margin-bottom: 1rem;
  text-align: justify;
  white-space: pre-line; /* 段落内也支持换行符 */
}

.text-only-layout .section-content br {
  display: block;
  margin: 0.5rem 0;
  content: ""; /* 确保br标签正确显示 */
}

.text-only-layout .section-content h1,
.text-only-layout .section-content h2,
.text-only-layout .section-content h3,
.text-only-layout .section-content h4,
.text-only-layout .section-content h5,
.text-only-layout .section-content h6 {
  color: #320063;
  margin: 1.5rem 0 1rem 0;
  font-weight: 600;
  white-space: normal; /* 标题不需要换行符处理 */
}

.text-only-layout .section-content h1 {
  font-size: 1.8rem;
}
.text-only-layout .section-content h2 {
  font-size: 1.6rem;
}
.text-only-layout .section-content h3 {
  font-size: 1.4rem;
}
.text-only-layout .section-content h4 {
  font-size: 1.2rem;
}
.text-only-layout .section-content h5 {
  font-size: 1.1rem;
}
.text-only-layout .section-content h6 {
  font-size: 1rem;
}

/* 处理换行符和段落间距 */
.text-only-layout .section-content p + p {
  margin-top: 1rem;
}

/* 确保换行符在内容中正确显示 */
.text-only-layout .section-content * {
  white-space: inherit; /* 继承父元素的white-space设置 */
}

@media (max-width: 768px) {
  .intro-section {
    padding: 2rem;
    margin: 1rem 0;
  }

  .section-title {
    font-size: 1.5rem;
  }

  .intro-content {
    flex-direction: column;
    gap: 1.5rem;
  }

  .intro-text {
    width: 100%;
    padding-right: 0;
  }

  .intro-image-top {
    max-width: 100%;
    margin-bottom: 1.5rem;
  }

  .intro-image-top img {
    max-height: 300px;
  }

  .page-title {
    font-size: 2rem;
  }

  .page-subtitle {
    font-size: 1rem;
  }

  .text-only-layout .content-sections {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .text-only-layout .default-content {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .text-only-layout .content-section {
    padding: 1.5rem;
  }

  .text-only-layout .main-title h3 {
    font-size: 1.8rem;
  }

  .text-only-layout .section-heading {
    font-size: 1.2rem;
  }

  .text-only-layout .section-content h1 {
    font-size: 1.6rem;
  }
  .text-only-layout .section-content h2 {
    font-size: 1.4rem;
  }
  .text-only-layout .section-content h3 {
    font-size: 1.2rem;
  }
  .text-only-layout .section-content h4 {
    font-size: 1.1rem;
  }
  .text-only-layout .section-content h5 {
    font-size: 1rem;
  }
  .text-only-layout .section-content h6 {
    font-size: 0.9rem;
  }
}

/* 内容包装器样式 */
.content-wrapper {
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
}

/* 解析后的内容样式 */
.parsed-content {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.parsed-content .content-section {
  background: white;
  border-radius: 15px;
  padding: 2rem;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  border: 1px solid #f0f0f0;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.parsed-content .content-section:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.parsed-content .section-heading {
  display: flex;
  align-items: center;
  font-size: 1.3rem;
  color: #320063;
  font-weight: 600;
  margin-bottom: 1rem;
  padding-bottom: 0.8rem;
  border-bottom: 2px solid #f0f0f0;
  background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
  padding: 1rem;
  border-radius: 8px 8px 0 0;
  margin: -2rem -2rem 1rem -2rem;
}

.parsed-content .section-heading .el-icon {
  margin-right: 12px;
  font-size: 1.4rem;
  color: #667eea;
  background: #f8f9fa;
  padding: 8px;
  border-radius: 8px;
}

.parsed-content .section-content {
  color: #555;
  line-height: 1.8;
  font-size: 1rem;
  white-space: pre-line;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* 原始内容样式 */
.raw-content {
  color: #555;
  line-height: 1.8;
  font-size: 1rem;
  white-space: pre-line;
  word-wrap: break-word;
  overflow-wrap: break-word;
  background: white;
  border-radius: 15px;
  padding: 2rem;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  border: 1px solid #f0f0f0;
}

.raw-content p {
  margin-bottom: 1rem;
  text-align: justify;
}

.raw-content h1,
.raw-content h2,
.raw-content h3,
.raw-content h4,
.raw-content h5,
.raw-content h6 {
  color: #320063;
  margin: 1.5rem 0 1rem 0;
  font-weight: 600;
}

.raw-content h1 {
  font-size: 1.8rem;
}
.raw-content h2 {
  font-size: 1.6rem;
}
.raw-content h3 {
  font-size: 1.4rem;
}
.raw-content h4 {
  font-size: 1.2rem;
}
.raw-content h5 {
  font-size: 1.1rem;
}
.raw-content h6 {
  font-size: 1rem;
}

/* 富文本内图片限制 */
.parsed-content .section-content :deep(img),
.raw-content :deep(img) {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 10px 0;
  border-radius: 8px;
}

.venue-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
}

.venue-card {
  background: #fff;
  border-radius: 16px;
  border: 1px solid #e8eaed;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
  overflow: hidden;
}

.venue-image img {
  width: 100%;
  height: auto;
  display: block;
}

.venue-body {
  padding: 18px 22px 22px;
}

.venue-title {
  margin: 0 0 10px 0;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--e-global-color-title);
}

.venue-rich {
  color: #555;
  line-height: 1.7;
}

.venue-rich :deep(img) {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 8px 0;
  border-radius: 8px;
}

/* 导航菜单样式 - 参考关于我们页面 */
.nav-menu {
  background: #f8f9fa;
  padding: 20px 0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.about-nav {
  display: flex;
  justify-content: center;
  gap: 30px;
  flex-wrap: wrap;
}

.nav-item {
  text-decoration: none;
  color: #333;
  font-size: 1.1rem;
  font-weight: 500;
  padding: 10px 20px;
  border-radius: 8px;
  transition: background-color 0.3s ease, color 0.3s ease;
  border: 1px solid #eee;
  cursor: pointer;
}

.nav-item:hover {
  background-color: var(--e-global-color-selected);
  color: white;
  border-color: var(--e-global-color-selected);
}

.nav-item.active {
  background-color: var(--e-global-color-selected);
  color: white;
  border-color: var(--e-global-color-selected);
}

/* 响应式设计 */
@media (max-width: 768px) {
  .about-nav {
    gap: 15px;
  }

  .nav-item {
    font-size: 1rem;
    padding: 8px 16px;
  }
}
</style>
